package com.li.youhappygo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.li.youhappygo.model.entity.log.SysOperLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.transaction.annotation.Transactional;

@Mapper
public interface SysOperLogMapper extends BaseMapper<SysOperLog> {

    @Insert("INSERT INTO sys_oper_log (" +
            "title, " +
            "method, " +
            "request_method, " +
            "operator_type, " +
            "oper_name, " +
            "oper_url, " +
            "oper_ip, " +
            "oper_param, " +
            "json_result, " +
            "status, " +
            "error_msg) " +
            "VALUES (" +
            "#{title}, " +
            "#{method}, " +
            "#{requestMethod}, " +
            "#{operatorType}, " +
            "#{operName}, " +
            "#{operUrl}, " +
            "#{operIp}, " +
            "#{operParam}, " +
            "#{jsonResult}, " +
            "#{status}, " +
            "#{errorMsg})")
    int insertSysOperLog(SysOperLog sysOperLog);
    }
